package cn.schoolwow.util.test.module.query.resource.testcase;

import cn.schoolwow.quickflow.domain.FlowContext;
import cn.schoolwow.quickflow.flow.BusinessFlow;
import cn.schoolwow.util.domain.query.resource.QueryResource;
import org.junit.Assert;

public class GetAsStringTestCaseFlow implements BusinessFlow {
    @Override
    public void executeBusinessFlow(FlowContext flowContext) throws Exception {
        String content = QueryResource.newQuery("helloWorld文本", "module/query/resource/helloWorld.txt")
                .execute()
                .getAsString();
        Assert.assertEquals("hello,world", content);
    }

    @Override
    public String name() {
        return "读取资源文件并返回字符串测试用例";
    }
}
